package com.gkey.demo.redis;

import redis.clients.jedis.Jedis;

public class RedisTool {

	
	   public static void main(String[] args) {
		       //连接本地的 Redis 服务
		      Jedis jedis = new Jedis("192.168.5.231");
		      System.out.println("Connection to server sucessfully");
		      //查看服务是否运行
		      System.out.println("Server is running: "+jedis.ping());
		      
		      jedis.set("key", "hello world!");		      
		      
		      System.out.println("key:"+jedis.get("key"));
		 }
	
	
}
